<?
$sajax = 1;
$title = 'Program Contacts';include("includes/functions.php");include("includes/sajax/functionsSajax.php");
include("includes/sajax/sajaxContacts.php");include("includes/sajax/sajax.php");
sajax_init();$sajax_request_type = "POST";sajax_handle_client_request();
if ($_GET[viewByLastName] == 1) {
	$contactString = getContacts('NameLast');
	$sortButton = '<a href="'.$_SERVER[PHP_SELF].'" title="Sort by Program"><img src="images/buttonSortProgram.gif" alt="Sort by Program" style="border: none;" /></a>';
	$itemID = 1;
} else {
	$contactString = getContacts('ProgramName');
	$sortButton = '<a href="'.$_SERVER[PHP_SELF].'?viewByLastName=1" title="Sort by Last Name"><img src="images/buttonSortLastName.gif" alt="Sort by Last Name" style="border: none;" /></a>';
	$itemID = 0;
}	
$printWhat = 'contacts';

include("includes/header.php"); ?>
<div style="text-align: left;">
	<div id="sortButtons" style="float: right; height: 30px;">
		<?=$sortButton; ?>
	</div>
	<div style="clear: right;"></div>
	<div id="programContactDisplay"><?=$contactString; ?></div>
</div><br /><? include("includes/footer.php"); ?>		